package com.code.day02.utils;

import java.sql.SQLException;

public class Test1 {
    public static void main(String[] args) {
        ThreadLocal<String> tl = new ThreadLocal<>();
        tl.set("test");
        String str = tl.get();
        System.out.println(str);

        new Thread(()->{
            System.out.println(tl.get()); //获取不到 get根据当前线程来获取value....map<Thread, value>
        }).start();
    }
}
